<template> 
    <!--员工守则-->
    <div class="companyBox">
        <div class="companyTitle"> {{ datas.title }}</div>
        <div class="companyRule" v-for="(item,index) in datas.contents" :key="index">
           {{ item.keyPoint }}
        </div>
    </div>
</template>

<script>
import datas from '../../mock/company/companyrule';
import i18n from '../../i18n';
export default {
    data() {
        return {
            datas
        }
    },
    created() {
        window.HWH5.setNavigationBarTitle({ title: this.$t('employeeConductRules')  });
        // 真实请求服务方法
        // const userId = this.$store.state.userInfo.userId
        // this.getDatas(userId)
            },
    methods: {
        // 获取服务接口数据
        // getDatas(userId) {
        //   真实接口服务请求 需要将userInfo中的id作为参数传进去做数据请求
        //   const url = 'https://xxx?userId' + userId;
        //   const _headers = {
        //     'Content-Type': 'application/json'
        //   };
        //   HWH5.fetchInternet(url, {
        //     method: 'get',
        //     headers: _headers
        //   })
        //     .then(res => {
        //       res.json().then(reply => {
        //           //将接口返回数据赋值给热服务
        //           this.datas = reply
        //       });
        //     })
        //     .catch(error => {
        //       console.log('请求异常', error);
        //     });
        // }
    }
}

</script>

<style lang="less" scoped>
.companyBox {
    box-sizing: border-box;
    padding: 8px 8px;
    background: #fff;
    margin-top: 10px;
    .companyTitle {
        font-family: PingFangSC-Medium;
        font-size: 18px;
        color: #000000;
        padding: 4px;
        letter-spacing: 0;
        margin-bottom:10px;
    }
    .companyRule {
        margin-bottom: 6px;
        padding: 4px;
        font-family: PingFangSC-Regular;
        font-size: 14px;
        color: #666666;
        letter-spacing: 0;
    }
}
</style>